/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.text.SimpleDateFormat;
import java.util.Calendar;

/**
 * <p>Project: javase - Var4
 * <p>Powered by webrx On 2021-11-19 15:43:24
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Var4 {

    public static void main(String[] args) {
        //java 10以后新增了 var关键字，主要用来进行推断类型声明
        var i = 6;
        var str = "hello world";
        //var y; 错误的,不赋值，不能进行推断类型

        //i = new Date();
        var sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        Calendar c2 = Calendar.getInstance();
        var c1 = Calendar.getInstance();

    }


}
